home *** CD-ROM | disk | FTP | other *** search
- /* PageMarker.m by Paul Rensinng November 1991
- * draws page boundary in drawing document
- *
- * Copyright (C) 1991 The Board of Trustees of
- * The Leland Stanford Junior University. All Rights Reserved.
- */
-
- #import "PageMarker.h"
-
- const char PageMarker_h_rcsid[] = PAGEMARKER_H_ID;
- const char PageMarker_m_rcsid[] = "$Id: PageMarker.m,v 1.2 1992/03/01 12:06:23 pfkeb Rel $";
-
- #import "HGraphicView.h"
- #import <appkit/View.h> /* for NXDrawingStatus */
- #import <math.h>
-
- @implementation PageMarker : Line
- /*
- * The line to mark a page boundary.
- * We must override a number of methods so that it does not print and
- * so it does not move around.
- */
-
- - addSelf: (id) hgraphview
- {
- NXRect box;
- float x;
-
- [ hgraphview getFrame: &box ];
-
- box.origin.x = 0;
- box.origin.y = box.size.height;
- box.size.height = 0.0;
- [ self setBounds: &box];
- x = 0.5;
- [ self setGray: &x ];
- x = 4.0;
- [ self setLineWidth: &x ];
- [ self lock ];
-
- [ hgraphview insertGraphicNoSelect: self ];
-
- return self;
- }
-
-
-
-
- - draw
- /*
- * Only draw if drawing on screen.
- */
- {
- if (bounds.size.width < 1.0 && bounds.size.height < 1.0) return self;
- if (NXDrawingStatus == NX_DRAWING)
- {
- [self setLineColor];
- [self drawLine];
- }
-
- return self;
- }
-
- @end
-
-